package conchmusic.conchmusicclient.mainUi;

import android.content.Context;
import android.graphics.Color;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.Layout;
import android.util.Log;
import android.view.Gravity;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.Toast;

import conchmusic.conchmusicclient.R;


public class SkinActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_skin);


}

//        int imgID = getResources().getIdentifier(name, "drawable",  
//                                        "entry.dsa");  
//                        if (imgID != 0) {  
//                                Drawable drawable = getResources().getDrawable(imgID);  
//              
//                                View temp = findViewById(R.id.mainid);  
//                                temp.setBackgroundDrawable(drawable);  
//                            }  


    public void changeSkin(View view) {
toastshow2("反馈成功，我们会及时处理");
}
    public void toastshow2(String story) {

        Toast toast = Toast.makeText(getApplicationContext(), story, Toast.LENGTH_LONG);
        toast.setGravity(Gravity.CENTER, 0, 0);
        LinearLayout toastView = (LinearLayout) toast.getView();
        ImageView imageCodeProject = new ImageView(getApplicationContext());
        imageCodeProject.setImageResource(R.mipmap.ic_launcher);
        toastView.addView(imageCodeProject, 0);
        toast.show();


    }
}
